<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 点击图⽚，图⽚向左翻转90度翻转 -->
    <img src="./06.png" alt="" onclick="imgBtn(0)" id="demoImg" />
    <script>
      let count = 0
      //点击事件
      function imgBtn(left) {
        //获取图片的id
        var img = document.getElementById('demoImg')
        if (left == 0) {
          //左旋转
          count = count - 90
        }
        img.style.transform = 'rotate(' + count + 'deg)'
      }
    </script>
  </body>
</html>
